Skip to content

Conversation

cnaples79
Copy link
Contributor

Summary

Partially addresses #1016 by marking a small set of public enums as so that downstream exhaustive matches remain forward-compatible as event shapes evolve.

Changes

  • lambda-events (DynamoDB): , , , , .
  • lambda-http: , , .

These types are likely to gain additional variants over time. Making them non-exhaustive reduces semver churn at the cost of requiring a wildcard match in consumers.

This is intentionally a minimal first step to validate appetite and direction; happy to expand the scope across crates in follow-ups or adjust the target set.

…s#1016)

- lambda-events (dynamodb): StreamViewType, StreamStatus, SharedIteratorType, OperationType, KeyType
- lambda-http: PayloadError, JsonPayloadError, FormUrlEncodedPayloadError

These enums are likely to grow; marking them non_exhaustive helps avoid semver hazards for downstream consumers who pattern-match exhaustively.
@PartiallyUntyped
Copy link
Contributor

Hi, looks good to me!
Will merge after tests.

@cnaples79
Copy link
Contributor Author

@PartiallyUntyped Sounds good, if anything needs tweaked just let me know!

@cnaples79
Copy link
Contributor Author

@PartiallyUntyped CI is red, nightly rustdoc now rejects socket2’s doc_auto_cfg, and cargo-semver-checks marks the new #[non_exhaustive] enums as a breaking change. Should I drop the non-exhaustive annotations for the existing enums, or are there plans for a major release / pinning rustdoc to handle this?

@PartiallyUntyped PartiallyUntyped self-assigned this Oct 8, 2025
@PartiallyUntyped
Copy link
Contributor

We will do a semver update down the road once we've updated all events. Thanks a lot for your contribution! ^_^

@PartiallyUntyped PartiallyUntyped merged commit 726bcea into awslabs:main Oct 8, 2025
12 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants